﻿
using AutoMapper;
using BPMN.Application.Contracts.DTO.Request.Menu;
using BPMN.Application.Contracts.DTO.Request.Custom;
using BPMN.Application.Contracts.DTO.Request.Role;
using BPMN.Application.Contracts.DTO.Response.Custom;
using BPMN.Application.Contracts.DTO.Response.Dictionary;
using BPMN.Application.Contracts.DTO.Response.Permission;
using BPMN.Application.Contracts.DTO.Response.Role;
using BPMN.Application.Contracts.DTO.Response.RolePermission;
using BPMN.Application.Contracts.DTO.Response.UserInfo;
using BPMN.Domain.Entity.Custom;
using BPMN.Domain.Entity.SysDictonary;
using BPMN.Domain.Entity.User;
using BPMN.DomianShare.PulicDto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BPMN.Application.Contracts.DTO.Request.UserInfo;
using BPMN.Application.Contracts.DTO.Request.Menu.Permission;

namespace BPMN.Application.AreaProfiles
{
    public class AreaProFile : Profile
    {
        public AreaProFile()
        {

            //用户
            //将dto映射到表，可以反转
            CreateMap<UserInfo, UserInfoRequestDto>().ReverseMap();
            CreateMap<UserInfoShowResponseDto, UserInfo>().ReverseMap();

            //角色
            CreateMap<Role, RoleRequstDto>().ReverseMap();
            CreateMap<Role, RoleShowResponseDto>().ReverseMap();
            //权限
            CreateMap<Permission, PermissionRequstDto>().ReverseMap();
            CreateMap<Permission, PermissionShowResponseDto>().ReverseMap();

            CreateMap<RolePermission, RolePermissionResponseShowDto>().ReverseMap();
            CreateMap<Menu, MenuShowDto>().ReverseMap();




            CreateMap<Custom, CustomRequstDto>().ReverseMap();
            CreateMap<Custom, CustomShowResponseDto>().ReverseMap();


            CreateMap<Dictionary, DictionaryRequstDto>().ReverseMap();
            CreateMap<DictionaryList, PulicDictonaryListResponseDto>().ReverseMap();
            CreateMap<Dictionary, DictonartyResponseDto>().ReverseMap();
            CreateMap<DictionaryList, DictionaryListResponseDto>().ReverseMap();

        }
    }
}
